export const numberFormatter = (num = 0, ratio = 0, decimalPlaces = 0) => {
  let processedNum
  if (ratio > 0) {
    processedNum = num / ratio
  } else {
    processedNum = num
  }
  processedNum = parseFloat(processedNum.toFixed(decimalPlaces))
  return processedNum.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,')
}